﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DemoCSLA.DalLinq;

namespace DemoCSLA.DalLinq
{
    public partial class Detalle
    {

        public static IQueryable<Detalle>
            GetDetalleByFactura(DemoCSLADataContext ctx, string cab)
        {
            return (from detalle in ctx.Detalles
                    where detalle.IdFacturaCabecera == cab
                    select detalle);
        }

        public static Detalle GetDetalleById(DemoCSLADataContext ctx, string Id)
        {
            return (from detalle in ctx.Detalles
                    where detalle.IdFacturaDetalle == Id
                    select detalle).SingleOrDefault();
        }

    }
}
